//文本设置
import request from "@/utils/request";

//文本渲染
export function getText(query) {
  return request({
    url: '/platform/text/list',
    method: 'get',
    params: query
  })
}

//编辑文本
export function getEditText(data) {
  return request({
    url: '/platform/text/edit',
    method: 'PUT',
    data
  })
}


//轮播图
export function getShowSide(query) {
  return request({
    url: '/slideshow/list',
    method: 'get',
    params: query
  })
}

//标签渲染
export function getLabel(query) {
  return request({
    url: '/system/label/list',
    method: 'get',
    query
  })
}

//添加标签
export function getAddLabel(data) {
  return request({
    url: '/system/label',
    method: 'post',
    data
  })
}

//编辑标签
export function getEditLabel(data) {
  return request({
    url: '/system/label',
    method: 'PUT',
    data
  })
}

//标签删除
export function getDelLabel(query) {
  return request({
    url: '/system/label/' + query,
    method: 'delete',
  })
}

//渲染栏目
export function getColumn(params) {
  return request({
    url: '/system/category/list',
    method: 'get',
    params
  })
}

//栏目添加、编辑
export function getAddColumn(data) {
  return request({
    url: '/system/category',
    method: 'post',
    data
  })
}

//栏目编辑完保存
export function getSave(data) {
  return request({
    url: '/system/category',
    method: 'put',
    data: data
  })
}

//栏目删除
export function getDelColumn(ids) {
  return request({
    url: `/system/category/${ids}`,
    method: 'delete',

  })
}

//文章跳转
export function getArticle(params) {
  return request({
    url: '/system/article/list',
    method: 'get',
    params
  })
}

//编辑轮播图
export function getEditShow(data) {
  return request({
    url: '/slideshow/edit',
    method: 'put',
    data
  })
}

//添加轮播
export function getAddShow(data) {
  return request({
    url: '/slideshow/add',
    method: 'post',
    data
  })
}

//删除轮播
export function getDelShow(data) {
  return request({
    url: '/slideshow/delete',
    method: 'delete',
    params: data
  })
}

